package com.example.day24;

/**
 * @author Lenovo
 */
public class ReflectDemo01 {
    public static void main(String[] args) throws ClassNotFoundException,
            NoSuchMethodException, IllegalAccessException, InvocationTargetException,
            InstantiationException {
        Class<?> c = Class.forName("com.itheima_02.Student");
        Constructor<?>[] cons = c.getDeclaredConstructors();
        for(Constructor con : cons) {
            System.out.println(con);
        }
        System.out.println("--------");
        Object obj = con.newInstance();
        System.out.println(obj);
    }
}